﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Text;
using System.Threading.Tasks;

namespace SimpleFactory
{
    public abstract class Pizza
    {
        /// <summary>
        /// 每种披萨必须准备不同的原材料，所以做成抽象方法
        /// </summary>
        public abstract void Prepare();
        public void Bake()
        {
            Console.WriteLine("pizza baking...");
        }
        public void Cut()
        {
            Console.WriteLine("pizza cuting...");
        }
        /// <summary>
        /// 每种披萨的包装可能不一样，可以进行调整，做成虚方法
        /// </summary>
        public virtual void Box()
        {
            Console.WriteLine("pizza boxing...");
        }
    }
}
